﻿<%@ Page Title="交易评价" Language="C#" MasterPageFile="~/member/mMenber.master" AutoEventWireup="true" CodeBehind="TradeRates.aspx.cs" Inherits="map.member.order.TradeRates" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head2" runat="server">
    <link href="../../outstyle.css" rel="stylesheet" type="text/css" />
    <script src="../../js/dropdowncontent.js" type="text/javascript"></script>
    <style  type ="text/css">
         .MainContentDiv
         {
             width:90%;
         }
         .TradeInfoDiv
         {
             border:solid 1px green;
             width:100%;
             padding:5px 5px 5px 5px;
         }
         .td1
         {
             width:35%;
         }
         .td2
         {
             width:35%;
         }
         .td3
         {
             width:30%;
         }
         .conentLabel
         {
             color :Blue ;
         }
         .TradeRateDiv
         {
             border:solid 1px green;
             width:100%;
             padding:5px 5px 5px 5px;
          }
          .TradeRateDiv table .td_1
          {
             vertical-align:top ;
              padding-top:5px;      
              padding-top:5px;
              border-bottom:dashed 1px LightGray;
              text-align:right;
          }
          .TradeRateDiv table .td_2
          {                    
             vertical-align:top ;
              padding-bottom:5px;
              padding-top:5px;
              border-bottom:dashed 1px LightGray;
              text-align:left ;
          }
            .CommandButton
        {
            background:url(/img/back-button_61x23.gif) no-repeat;
            height:23px;
            width:61px;
            border:none;
            cursor:pointer;
        }
        
         .SubmitCharge
        {
            background:url(/img/btnTmp_orange.png) no-repeat 0px -34px;
            border:none;
            text-align:center;
            padding-left:20px;
            font-weight:bold ;
            cursor:pointer ;
            width:100px;
            height:34px;
        }
        
        .validateErrorMsg
        {
            background:url(/img/errorMsg.ico) no-repeat ;
            padding-left:20px;
            border:solid 1px red;
            font-size:smaller;
            padding:1px 2px 1px 20px;  
            color:Red;
        } 
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
    <div class ="MainContentDiv">
        <h3>
            <asp:Label ID="RateTypeStrLabel" runat="server" Text="Label"></asp:Label>
        </h3>
        <div class ="TradeInfoDiv">              
            <h2>交易详细情况：</h2>
            <table style=" width:100%;margin:5px 5px 5px 5px;">
                <tr>
                    <td class="td1"  style=" width:65%" colspan="2">
                        宝贝名称：<asp:HyperLink ID="ItemNameHyperLink" Target ="_blank" ToolTip ="点击查看宝贝详情" CssClass ="conentLabel" runat="server"></asp:HyperLink>
                    </td>
                    <td style=" width:35%">
                        <asp:Label ID="NickTypeLabel" runat="server" ></asp:Label>：
                        <asp:Label ID="NickNameLabel" CssClass ="conentLabel"  runat="server" ></asp:Label>
                        <%= RuleCode.Table.cbuser.getChatStrfromuserid(GetOtherUserId())%>
                    </td>
                </tr>
                <tr>
                    <td class="td1">
                        购买数量：<asp:Label ID="ItemCountLabel" CssClass ="conentLabel"  runat="server">0</asp:Label>
                    </td>
                    <td class="td2">
                        购买单价：<asp:Label ID="ItemPriceLabel" CssClass ="conentLabel"  runat="server">0</asp:Label>
                    </td>
                    <td class="td3">
                        实际总价：<asp:Label ID="TotalPayLabel" CssClass ="conentLabel"  runat="server">0</asp:Label>
                    </td>
                </tr>
                 <tr>
                    <td class="td1">
                        物流方式：<asp:Label ID="PostTypeLabel" CssClass ="conentLabel"  runat="server">0</asp:Label>
                    </td>
                    <td class="td2">
                        交易创建时间：<asp:Label ID="TradeDateLabel" CssClass ="conentLabel"  runat="server">0</asp:Label>
                    </td>
                    <td class="td3">
                        <%--交易创建时间：<asp:Label ID="TradeTimeLabel" runat="server">0</asp:Label>--%>
                    </td>
                </tr>
            </table> 
        </div>
        <br />
        <div class="TradeRateDiv">
            <table style="margin:5px 5px 5px 5px;" cellpadding="0" cellspacing="0">
                <tr>
                    <td class="td_1">
                        综合评价：<br />                  
                    </td>
                    <td class="td_2">
                        <asp:RadioButtonList ID="TotalPointRadioButtonList" runat="server">
                            <asp:ListItem Selected ="True" >好评</asp:ListItem>
                            <asp:ListItem >差评</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="td_1" style="color: #FF0000">
                        注意：</td>
                    <td class="td_2">
                        1，评价收费，每次1元；<br />
                        2，评价要有详细描述；</td>
                </tr>
                <tr>
                    <td class="td_1">评价附言：</td>
                    <td class="td_2">
                        <asp:TextBox ID="RateTitleTextBox"  Width="500px" runat="server"></asp:TextBox>
                    </td>
                </tr>                   
                <tr>
                    <td class="td_1">评价描述：</td>
                    <td class="td_2">
                        <asp:TextBox ID="RateDescTextBox"  Width="500px"  TextMode ="MultiLine"  Height="200px" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="td_1">当前用户名：</td>
                    <td class="td_2">
                        <asp:Label ID="CurrentUserLabel" runat="server"  > </asp:Label> 
                    </td>
                </tr>
                <tr>
                    <td class="td_1">密码：</td>
                    <td class="td_2">
                        <asp:TextBox ID="PasswordTextBox"  Width="150px"   TextMode="Password"  runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="td_1">
                        验证码：
                    </td>            
                    <td class="td_2">
                         <table>
                            <tr>
                                <td style=" vertical-align:top; ">
                                    <input  type="text" id="CheckupCodeInput" style=" width:80px" value="" />
                                </td>
                                <td style=" vertical-align:top; ">
                                    <img   title="不区分大小写" src ="/controls/RandomCheckupCoding.aspx?count=4&key=test" id="checkupImg"/>
                                </td>
                                <td style=" vertical-align:middle ; ">
                                    <a title="不区分大小写" href ="#1" onclick="refreshCheckupImg();" style=" font-size:smaller;">看不清楚，换一张</a>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td class="td_1">&nbsp;</td>
                    <td class="td_2">
                        <asp:Button CssClass="SubmitCharge" ID="AddRateButton" runat="server"  OnClientClick="return validateSubmit();"
                            Text="提交评价" onclick="AddRateButton_Click" 
                            />
                    </td>
                </tr>
            </table>
        </div>
    </div> 
     <script src="/js/PageValidateUtil.js" type="text/javascript"></script>    
    <script type="text/javascript">
        var idPrefix = "ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder3_";
        //刷新验证码
        function refreshCheckupImg() {
            var checkupImg = document.getElementById("checkupImg");
            checkupImg.src = "/controls/RandomCheckupCoding.aspx?count=4&key=test&dd=" + Date().toString();
        }
        //验证码
        function validateCheckUp() {
            var checkupInput = document.getElementById("CheckupCodeInput");
            var result = AjaxFunction.GetSessionValue("test_checkcode");
            if (result.value != null && result.value != "") {
                return (result.value.toLowerCase() == checkupInput.value.toLowerCase());
            }
            return false;
        }
        function validatePassword() {
            var userid = document.getElementById(idPrefix + "CurrentUserLabel").innerHTML;
            var password = document.getElementById(idPrefix + "PasswordTextBox").value;
            var result = AjaxFunction.ValidatePassword(userid, password);
            if (result.value != null && result.value == true)
                return true;
            return false;
        }
        PageValidateUtil.CustomerValidate("CheckupCodeInput", validateCheckUp, "验证码不正确！", "validateErrorMsg", 2);
        PageValidateUtil.CustomerValidate(idPrefix + "PasswordTextBox", validatePassword, "密码不正确", "validateErrorMsg", 2);

        function validateSubmit() {
            var errorCount = PageValidateUtil.initImidValidates(["CustomerValidate", "CustomerValidate"], [
                            ["CheckupCodeInput", validateCheckUp, "验证码不正确！", "validateErrorMsg", 1],
                            [idPrefix + "PasswordTextBox", validatePassword, "密码不正确", "validateErrorMsg", 1]]);
            return (errorCount <= 0);
        }
    </script>
</asp:Content>
